<?php
require_once "./db_config.php";
class TREE{
  public $id='';
  public $label='';
  public $children=[];
}
$deptList=[];
$sql='SELECT * FROM prs_dictionary WHERE type = `dept`';
$result=mysqli_query($conn,$sql);
if(mysqli_num_rows($result) > 0){
  while($row = mysqli_fetch_assoc($result)) {
    $deptList[]=$row;
  }
  for ($i=0;$i<$deptList.length;$i++){

  }
}else{
  echo "ERROR!";
}
mysqli_close($conn);
